Skip to content

Fix NULL derefs, buffer overflow, and i2d contract in EVP/OCSP/X509#10217

Open
ColtonWilley wants to merge 3 commits intowolfSSL:masterfrom
ColtonWilley:null-checks-evp-ocsp-x509
Open

Fix NULL derefs, buffer overflow, and i2d contract in EVP/OCSP/X509#10217
ColtonWilley wants to merge 3 commits intowolfSSL:masterfrom
ColtonWilley:null-checks-evp-ocsp-x509

Conversation

@ColtonWilley
Copy link
Copy Markdown
Contributor

@ColtonWilley ColtonWilley commented Apr 14, 2026

Summary

Harden OpenSSL compatibility layer against NULL pointers, negative lengths,
and buffer overflows across EVP, OCSP, and X509 APIs. Fix DSA SignFinal
write-before-check overflow, add missing i2d_OCSP_RESPONSE allocation path,
and fix unaligned keyUsage access.

Test plan

  • Existing CI passes
  • OCSP single_get0_status test updated for new -1 return on NULL

Harden OpenSSL compatibility layer against NULL pointers, negative lengths,
and buffer overflows across EVP, OCSP, and X509 APIs. Fix DSA SignFinal
write-before-check overflow, add missing i2d_OCSP_RESPONSE allocation path,
and fix unaligned keyUsage access.
@mattia-moffa mattia-moffa self-assigned this Apr 15, 2026
@mattia-moffa
Copy link
Copy Markdown
Contributor

Jenkins retest this please (Peer closed underlying transport)

@github-actions
Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10217

Scan targets checked: wolfcrypt-api_misuse, wolfcrypt-bugs, wolfcrypt-compliance, wolfcrypt-concurrency, wolfcrypt-consttime, wolfcrypt-defaults, wolfcrypt-mutation, wolfcrypt-portability, wolfcrypt-proptest, wolfcrypt-src, wolfcrypt-zeroize, wolfssl-bugs, wolfssl-compliance, wolfssl-consttime, wolfssl-defaults, wolfssl-mutation, wolfssl-proptest, wolfssl-src, wolfssl-zeroize

No new issues found in the changed files. ✅

@mattia-moffa mattia-moffa marked this pull request as ready for review April 18, 2026 01:12
Copilot AI review requested due to automatic review settings April 18, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants